#include <asm/msr.h>
#include <asm/mpspec.h>
-#undef Dprintk
-#define Dprintk(x...) printk(x)
-
-unsigned int nmi_watchdog = NMI_LOCAL_APIC;
+unsigned int nmi_watchdog = NMI_NONE;
static unsigned int nmi_hz = HZ;
unsigned int nmi_perfctr_msr; /* the MSR to reset in NMI handler */
extern void show_registers(struct pt_regs *regs);
unsigned int prev_nmi_count[NR_CPUS];
int j, cpu;
+ if (!nmi_watchdog)
+ return 0;
+
printk("testing NMI watchdog ---\n");
for (j = 0; j < smp_num_cpus; j++) {
void __pminit setup_apic_nmi_watchdog (void)
{
+ if (!nmi_watchdog)
+ return;
+
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
if (boot_cpu_data.x86 != 6 && boot_cpu_data.x86 != 15)
extern void tqueue_bh(void);
extern void immediate_bh(void);
extern void init_timervecs(void);
- extern void disable_pit(void);
- extern void ac_timer_init(void);
+ extern void disable_pit(void);
+ extern void ac_timer_init(void);
extern int setup_network_devices(void);
extern void net_init(void);
extern void initialize_block_io(void);
extern void initialize_keytable();
extern void initialize_serial(void);
extern void initialize_keyboard(void);
- extern int opt_nosmp;
+ extern int opt_nosmp, opt_watchdog;
unsigned long low_mem_size;
+ if ( opt_watchdog )
+ nmi_watchdog = NMI_LOCAL_APIC;
+
/*
* We do this early, but tables are in the lowest 1MB (usually
* 0xfe000-0xfffff). Therefore they're unlikely to ever get clobbered.
unsigned int opt_dom0_mem = 16000; /* default kbytes for DOM0 */
unsigned int opt_ne_base = 0; /* NE2k NICs cannot be probed */
unsigned char opt_ifname[10] = "eth0";
-int opt_noht=0, opt_noacpi=0, opt_nosmp=0;
+int opt_noht=0, opt_noacpi=0, opt_nosmp=0, opt_watchdog=0;
enum { OPT_IP, OPT_STR, OPT_UINT, OPT_BOOL };
static struct {
unsigned char *name;
{ "noht", OPT_BOOL, &opt_noht },
{ "noacpi", OPT_BOOL, &opt_noacpi },
{ "nosmp", OPT_BOOL, &opt_nosmp },
+ { "watchdog", OPT_BOOL, &opt_watchdog },
{ NULL, 0, NULL }
};
phys_seg[nr_psegs].nr_sects = nr_sects;
if (p->domain != 0 &&
!xen_physdisk_access_okay(&phys_seg[nr_psegs], p, operation)) {
- DPRINTK("access denied\n");
- /* XXX not quite right, but close enough. */
- goto bad_descriptor;
+ DPRINTK("access denied: dev=%04x off=%ld nr=%ld\n",
+ req->device, req->sector_number + tot_sects, nr_sects);
+ goto bad_descriptor;
}
phys_seg[nr_psegs].dev = xendev_to_physdev(req->device);
if ( phys_seg[nr_psegs].dev == 0 )
{
- DPRINTK("bad device\n");
+ DPRINTK("bad device: %04x\n", req_device);
goto bad_descriptor;
}
new_segs = 1;
net_vif_t *vif;
net_idx_t *shared_idxs;
unsigned int i, j, idx;
- struct sk_buff *skb;
+ struct sk_buff *skb, *interdom_skb = NULL;
tx_req_entry_t tx;
rx_req_entry_t rx;
unsigned long pte_pfn, buf_pfn;
skb->len = tx.size - ETH_HLEN;
unmap_domain_mem(skb->head);
- (void)netif_rx(skb);
+ /*
+ * We must defer netif_rx until we have released the current
+ * domain's page_lock, or we may deadlock on SMP.
+ */
+ interdom_skb = skb;
make_tx_response(vif, tx.id, RING_STATUS_OK);
}
tx_unmap_and_continue:
unmap_domain_mem(g_data);
spin_unlock_irq(¤t->page_lock);
+ if ( interdom_skb != NULL )
+ {
+ (void)netif_rx(interdom_skb);
+ interdom_skb = NULL;
+ }
}
vif->tx_req_cons = i;